package command;

import java.util.Arrays;

public class Client {
    public static void main(String[] args) {
        ClientInvoker invoker = new ClientInvoker();
        TvReceiver tvReceiver = new TvReceiver();
        TVOnCommand tvOnCommand = new TVOnCommand(tvReceiver);
        TVOffCommand tvOffCommand = new TVOffCommand(tvReceiver);

        //setCommand(0, () -> tvReceiver.on(), () -> tvReceiver.off());
        invoker.setCommand(0, tvOnCommand);
        invoker.setCommand(1, tvOffCommand);
        invoker.pressButton(0);
        invoker.pressButton(1);
        invoker.undo();
    }
}
